local lsp_xuanyan = fk.CreateSkill {
    name = "lsp_xuanyan",
}

Fk:loadTranslationTable {
    ["lsp_xuanyan"] = "玄炎",
    [":lsp_xuanyan"] = "当你进入濒死状态时，若你的体力上限不小于2，你摸两张牌，回复体力至1点，然后减少一点体力上限，令〖复哀〗的X基数+1。",

}
lsp_xuanyan:addEffect(fk.EnterDying, {
    anim_type = "support",
    can_trigger = function(self, event, target, player, data)
        return target == player and player.maxHp >= 2 and player:hasSkill(lsp_xuanyan.name)
    end,
    on_cost = function(self, event, target, player, data)
        return player.room:askToSkillInvoke(player,
            { skill_name = lsp_xuanyan.name, prompt = "玄炎：是否摸两张牌，回复至一点体力" })
    end,
    on_use = function(self, event, target, player, data)
        local room = player.room
        player:drawCards(2, lsp_xuanyan.name)
        room:recover {
            who = player,
            num = 1 - player.hp,
            skillName = lsp_xuanyan.name,
            recoverBy = player,
        }
        room:changeMaxHp(player, -1)
        room:addPlayerMark(player, "lsp_xuanyan")
    end,
})
return lsp_xuanyan
